import Vue from 'vue'
import App from './App'
import router from './router'
import './assets/libs/flexible/flexible.js'
import resource from 'vue-resource'

//弹出框
import swal from 'sweetalert'
require('sweetalert/dist/sweetalert.css')

import $common from './assets/js/common'
import $config from './assets/js/config'

Vue.config.productionTip = false

Vue.use($common)
Vue.use(resource)

Vue.http.options.emulateJSON = true;

router.beforeEach((to, from, next) => {
  $config.init(next);
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  render: h => h(App)
})
